package com.wood.life.controller;

import com.wood.life.service.OrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * author: dz
 * 2022-10-21-10:13
 */
@RestController
@RequestMapping("/orderDetails")
public class OrderDetailsController {
    @Autowired
    OrderDetailsService orderDetailsService;

    @RequestMapping("/getByOrderId")
    public void getByOrderId(Integer id) {
        orderDetailsService.getByOrderId(id);
        System.out.println(orderDetailsService.getByOrderId(id));
    }

    @RequestMapping("/getByGoodsId")
    public void getByGoodsId(Integer goodsId) {
        orderDetailsService.getByGoodsId(goodsId);
        System.out.println(orderDetailsService.getByGoodsId(goodsId));
    }
}
